// 用于运行环境相关检测

import { history } from 'umi';

// 用于检测当前应用是否支行在 iFrame 中，当需要嵌入其他系统时，必须指定 query 的 loginType 为 1
const isRunInFrame: boolean = history.location.query?.loginType === '1';
const isOpenFromJobSystem: boolean = history.location.query?.loginType === '0';
const isOpenFromPlatform: boolean = localStorage.getItem('isOpenFromPlatform') === null? false : true; 


export { isRunInFrame, isOpenFromJobSystem, isOpenFromPlatform };
